home *** CD-ROM | disk | FTP | other *** search
- /*****
- *
- * MenuFile.c
- *
- * This is a support file for "Grant's CGI Framework".
- * Please see the license agreement that accompanies the distribution package
- * for licensing details.
- *
- * Copyright ©1995,1996 by Grant Neufeld
- * grant@acm.com
- * http://arpp.carleton.ca/grant/
- *
- *****/
-
- #include "MyConfiguration.h"
- #if kCompileWithForeground
-
- #include "compiler_stuff.h"
- #include "globals.h"
-
- #include "MenuFunc.h"
- #include "Quit.h"
- #include "WindowInt.h"
-
- #include "MenuFile.h"
-
-
- /*** FUNCTIONS ***/
-
- /* */
- void
- doFileMenu ( short theItem, short modifiers )
- {
- switch ( theItem )
- {
- case kmiClose :
- WindowMenuClose ( modifiers );
- break;
-
- case kmiQuit :
- doQuitApp ();
- break;
-
- default :
- /* invalid item */
- break;
- }
-
- } /* doFileMenu */
-
-
- /* */
- void
- adjustFileMenu ( window_type theWindowType )
- {
- switch ( theWindowType )
- {
- case Window_about :
- case Window_DA :
- case Window_Application :
- EnableItem ( gmFileMenu, kmiClose );
- EnableItem ( gmFileMenu, kmiQuit );
- break;
-
- case Window_none :
- DisableItem ( gmFileMenu, kmiClose );
- EnableItem ( gmFileMenu, kmiQuit );
- break;
-
- case Window_UNKNOWN :
- case Window_dlgModal :
- case Window_dlgMoveableModal :
- default :
- DisableItem ( gmFileMenu, kmiClose );
- DisableItem ( gmFileMenu, kmiQuit );
- break;
- }
-
- EnableItem (gmFileMenu, kmTheWholeMenu);
- } /* adjustFileMenu */
-
-
- #endif /* kCompileWithForeground */
-
- /***** EOF *****/
-